import os
import sys

target_mark = '30'
single_file = sys.argv[1]
abs_path_1 = os.path.abspath(single_file)
root = os.path.dirname(abs_path_1)

FileNames=os.listdir(root)
for index,ele in enumerate(FileNames):
    if 'raw' in ele or 'RAW' in ele :
        abs_path_i = os.path.abspath(ele)
        dir_path = os.path.dirname(abs_path_i)
        target_name = target_mark + '_'+ str(index)+'.raw'
        target_path = os.path.join(dir_path,target_name)
        os.rename(abs_path_i,target_path)